import React, { Component } from 'react'
import context from './context'

export default class C extends Component {
    static contextType = context
    render() {
        return (
            <div style={{ background: 'red', padding: '10px' }}>
                <h1>我是C组件,我收到了一台车{this.context.car}</h1>
            </div>
        )
    }
}
